<template>


	<view class="item" v-for="(item,index) in props.list" :key="index" @click="emit('emitItem',item)">
		<view class="item-conetnt">
			<image src="../../../../static/forgettingIcon1.png" mode="" class="item-conetnt-img" />
			<text class="text1 text-color-4">{{item.username}}</text>
			<text class="text2" v-if="item.grade">({{item.grade}})</text>
			<text class="text3">{{item.phone}}</text>
		</view>  

		<image class="item-path" src="../../../../static/messageIcon.png" mode=""></image>
	</view>


</template>

<script setup>
	import {
		ref
	} from 'vue';
	const emit = defineEmits(['emitOpen'])
	const props = defineProps({
		list: {
			type: Object,
			default: () => {
				return []
			}
		},
	})
	const emitOpen = () => {
		emit('emitOpen')
	}
</script>

<style lang="scss" scoped>
	.list {
		display: flex;
		flex-direction: column;
		width: 100%;
	}

	text {
		font-size: 26rpx;
	}

	.item {
		margin: 0 auto;
		padding: 12rpx 24rpx;
		padding-right: 90rpx;
		position: relative;
		display: flex;
		justify-content: center;
		flex-direction: column;
		width: 670rpx;
		min-height: 117rpx;
		opacity: 1;
		border-radius: 9rpx;
		background: rgba(255, 255, 255, 1);
		border: 2rpx solid rgba(236, 236, 236, 1);
		margin-top: 20rpx;
	}



	.item-path {
		position: absolute;
		top: 50%;
		transform: rotate(-90deg) translateX(50%);
		right: 12rpx;
		width: 32rpx;
		height: 32rpx;
	}

	.btn {
		position: absolute;
		bottom: 12rpx;
		right: 12rpx;
		padding: 8rpx 16rpx;
		opacity: 1;
		border-radius: 5.26rpx;
		background: linear-gradient(90deg, rgba(121, 72, 234, 1) 0%, rgba(172, 51, 193, 1) 100%);
		color: #fff;
		font-size: 32rpx;
		line-height: 40rpx;
	}

	.item-conetnt {
		display: flex;
		align-items: center;

		.item-conetnt-img {
			width: 26rpx;
			height: 26rpx;
			margin-right: 24rpx;
		}
	}

	.text1 {
		font-size: 30rpx;
		margin-right: 30rpx;
	}

	.text2 {

		margin-right: 30rpx;
	}

	.text3 {
		font-size: 30rpx;
		color: rgba(102, 102, 102, 1);
	}
</style>